package linklist;

import java.util.Queue;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:周次煜
 * Date: 2024-03-31
 * Time：18:57
 */
public class TestList {

    public static void main(String[] args) {


        AbLinkList myl=new MyLinkedList();
        System.out.println("=======增加数据========");
        myl.addIndex(0,2);
        myl.addIndex(1,3);
        myl.addIndex(1,6);
        myl.addFirst(1);
        myl.addFirst(1);
        myl.addLast(7);

        myl.display();



       System.out.println("======查找数据=========");
       int i=7;
       if (myl.contains(i)) {
           System.out.println(i+" 数据存在！");
       } else {
           System.out.println(i+" 数据不存在！");

       }




        System.out.println("========删除数据=========");
        myl.remove(3);
        myl.remove(7);
        myl.display();

        myl.removeAllKey(1);
        myl.display();



        System.out.println("========获取链表长度=========");
        System.out.println(myl.size());
        myl.clear();


        myl.clear();

    }
}




